From ea866c635b2c95067ef32b0b9a1aa90814f0b87c Mon Sep 17 00:00:00 2001 From: "Dr. Michael J. Chudobiak" Date: Wed, 8 Apr 2009 10:33:08 -0400 Subject: [PATCH] Fixed minor memory leak on error Bug 578290. Fixed a minor memory leak that occurs after a memory allocation error. Found it using cppcheck. --- gdk-pixbuf/io-jpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c index da59386c16..cf8c9ed195 100644 --- a/gdk-pixbuf/io-jpeg.c +++ b/gdk-pixbuf/io-jpeg.c @@ -1184,6 +1184,7 @@ real_save_jpeg (GdkPixbuf *pixbuf, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, _("Couldn't allocate memory for loading JPEG file")); + g_free (buf); return FALSE; } } -- 2.30.2